<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>主页</a></li>
			<li><a>商户管理</a></li>
			<li class="active"><strong>商户进件修改</strong></li>
		</ol>
	</div>
</div>


<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app
	ng-controller="merchantUpdateCtrl">
	<form class="form-horizontal" id="form1" name="horizontal" novalidate>
		<div class="row">
			<div class="col-lg-12">
				<div class="tabs-container tab_other">
					<uib-tabset>  
						<uib-tab> 
							<uib-tab-heading> 
								<span
									class="block m-t-xs"> <i class="fa fa-laptop"></i> <strong
									class="font-bold">审核信息</strong>
								</span> 
							</uib-tab-heading> 
							
							<div class="panel-body">
								<div class="ibox-title">
									<h5>基本信息</h5>
								</div>
								<div class="ibox-content">
									
									<div class="form-group">
										<label class="col-sm-2 control-label">商户进件编号：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.id">
										</div>
										
										<label class="col-sm-2 control-label">商户编号：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.merchantNo">
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">商户名称：</label>
										<div class="col-sm-2">
											<input ng-model="info.merchantName" type="text" class="form-control" name="merchantName" required>
											<div class="req_mesg" ng-show="horizontal.merchantName.$dirty && horizontal.merchantName.$invalid">
												<span ng-show="horizontal.merchantName.$error.required">商户名称不能为空</span>
											</div>
										</div>
										
										<label class="col-sm-2 control-label">手机号：</label>
										<div class="col-sm-2" >
											<input ng-model="info.mobilephone" type="text" class="form-control" name="mobilephone" ng-pattern="/^1[3-9]\d{9}$/" required>
											<div class="req_mesg" ng-show="horizontal.mobilephone.$dirty && horizontal.mobilephone.$invalid">
												<span ng-show="horizontal.mobilephone.$error.required">手机号不能为空</span>
												<span ng-show="horizontal.mobilephone.$error.pattern">输入手机号有误，请重新输入!</span>
											</div>
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">法人姓名：</label>
										
										<div class="col-sm-2 " >
													<input ng-model="info.lawyer"" type="text" class="form-control" name="lawyer" required >
													<div class="req_mesg" ng-show="horizontal.lawyer.$dirty && horizontal.lawyer.$invalid">
													<span ng-show="horizontal.lawyer.$error.required">法人姓名不能为空</span>
												</div>
										
										</div>
										<label class="col-sm-2 control-label">法人身份证号：</label>
										<div class="col-sm-2 checkbox" ng-bind="info.idCardNo">
										</div>
									</div>
										
									<div class="form-group">
										<label class="col-sm-2 control-label">一级代理商：</label>
										<div class="col-sm-2 checkbox" ng-bind="agent.agentName">
										</div>
										<label class="col-sm-2 control-label">一级代理商所属销售：</label>
										<div class="col-sm-2 checkbox" ng-bind="agent.saleName">
										</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">进件来源：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.itemSource |formatDropping:merItemSourceList">
										</div>
										<label class="col-sm-2 control-label">业务产品：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.bpName">
	 									</div>
									</div>
									
									<div class="form-group">
										<label class="col-sm-2 control-label">业务产品状态：</label>
										<div class="col-sm-2">
											<select class="form-control" ng-model="mbp.status" ng-options="x.value as x.text for x in itemStatus"/>
										</div>
										<label class="col-sm-2 control-label">商户状态：</label>
										<div class="col-sm-2">
											<select class="form-control" ng-model="info.status" ng-options="x.value as x.text for x in merStatusList"/>
										</div>
									</div>
									
									<div class="form-group">
											<label class="col-sm-2 control-label">所属代理商：</label>
											<div class="col-sm-2 checkbox" ng-bind="merAgent.agentName">
											</div>
										</div>
									
									
										
								</div>
								
							</div>
							
							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>机具信息</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group" ng-repeat="val in terminal">
										<label class="col-sm-2 control-label">业务产品：</label>
										<div class="col-sm-2 checkbox" ng-bind="val.bpName">
										</div>
										<label class="col-sm-2 control-label">机具号：</label>
										<div class="col-sm-2 checkbox" ng-bind="val.sn">
										</div>
									</div>
									<div class="form-group" ng-repeat="val in terminal">
										<label class="col-sm-2 control-label">机具总数：</label>
										<div class="col-sm-2 checkbox" ng-bind="terminalTotal">
										</div>
									</div>
								</div>
							</div>
							
							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>经营信息</h5>
								</div>
								<div class="ibox-content">
		
									<div class="form-group">
										<label class="col-sm-2 control-label">商户类型：</label>
										<div class="col-sm-2">
											<select disabled="disabled" class="form-control" ng-model="info.merchantType" ng-options="x.value as x.text for x in mTypes"/>
										</div>
										<label class="col-sm-2 control-label">业务产品：</label>
										<div class="col-sm-2">
											<select disabled="disabled" class="form-control" ng-model="mbp.bpId"
											 ng-options="x.value as x.text for x in productTypes"/>
										</div>
									</div>
									
									<div class="form-group"  ng-hide="info.merchantType==1">
										<label class="col-sm-2 control-label">经营范围：</label>
										<div class="col-sm-2 checkbox">
											<select  disabled="disabled" class="form-control" ng-change="choseTwo(info.businessType)" ng-model="info.businessType" ng-options="x.value as x.text for x in businessTypes"/>
										</div>
										<div class="col-sm-2 checkbox">
											<select  disabled="disabled" class="form-control" ng-model="info.industryType" ng-options="x.value as x.text for x in twoInfo"/>
										</div>
									</div>
									
								</div>
							</div>
							<div class="panel-body ibox float-e-margins">
									<div class="ibox-title">
										<h5>备注</h5>
									</div>
									<div class="ibox-content">			
											<div class="form-group">
												<div class="col-sm-3">
													<textarea rows="5" cols="100"  class="form-control" ng-model="info.remark"/>
												</div>
											</div>
										
									</div>
								</div>
							
							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>审核记录</h5>
								</div>
								<div class="ibox-content">
									<div class="gridStyle" style="height: 200px;" ui-grid-resize-columns ui-grid="merchantRecords"/>
								</div>
							</div>
							
							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>自动审核记录</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group">
										<label class="col-sm-2 control-label">自动审核次数：</label>
										<div class="col-sm-1 checkbox" ng-bind="mbp.autoCheckTimes">
										</div>
										<label class="col-sm-2 control-label">是否经过自动审核：</label>
										<div class="col-sm-1 checkbox" ng-bind="isCheck">
										</div>
										<label class="col-sm-2 control-label">自动审核结论：</label>
										<div class="col-sm-1 checkbox" ng-bind="checkStatus">
										</div>
									</div>
									<div class="form-group">
										<div class="gridStyle auditDetail" style="height: 300px;" ui-grid-resize-columns ui-grid="merchantCheckRecords"/>
									</div>
								</div>
							</div>
							
							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>明细</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group">
										<div ui-grid="merchantDetailed" ui-grid-resize-columns ui-grid-selection class="grid"></div>
									</div>
									<div class="form-group" style="padding-bottom: 20px;">
										<div class="col-img"  ng-repeat="m in listMris">
											<div>{{m.itemName}}</div>
											<div><img width="250px" height="150px" ng-src="{{m.content}}" ng-click="updateMriInfo(m.mriId,m.photo,m.id,m.merBpId,m.status,m.content,m.itemName)"/></div>
										</div>
									</div>
									
								</div>
							</div>
						</uib-tab> 
					
						
						<uib-tab> 
							<uib-tab-heading> 
								<span
									class="block m-t-xs"> <i class="fa fa-laptop"></i> <strong
									class="font-bold">服务费率</strong>
								</span> 
							</uib-tab-heading> 
							
							<div class="panel-body">
								<div ui-grid="merchantRateList" ui-grid-resize-columns ui-grid-selection class="grid"></div>
								<div class="block m-t-xs">
	                           		<strong>备注：</strong><br/>
										每笔固定金额1元，则填写商户费率1.00;<br/>
										每笔扣率为0.1%则填写商户费率0.1%;<br/>
										每笔扣率为0.1%，封顶3元，保底1元则填写商户费率1.00~0.1%~3.00;<br/>
										每笔扣率为0.1%加上固定金额1元，则填写商户费率0.1%+1.00;<br/>
										单笔阶梯扣率如10000.00元以下，扣率0.38%，10000.00元及以上扣率0.37%，则填写0.38%<10000.00<0.37%;<br/>
										每笔扣率为0.1%，封顶3元，则填写商户费率0.1%~3.00；<br/>
						  		 </div>
							</div>
							
						</uib-tab> 
						
						<uib-tab> 
							<uib-tab-heading> 
								<span
									class="block m-t-xs"> <i class="fa fa-laptop"></i> <strong
									class="font-bold">服务限额</strong>
								</span> 
							</uib-tab-heading> 
							<div class="panel-body">
	                          	<div ui-grid="merchantQuotaList" ui-grid-resize-columns ui-grid-selection class="grid"></div>
	                        </div>
						</uib-tab> 
						
						<uib-tab> 
							<uib-tab-heading> 
								<span
									class="block m-t-xs"> <i class="fa fa-laptop"></i> <strong
									class="font-bold">服务状态管理</strong>
								</span> 
							</uib-tab-heading> 
							<div class="panel-body">
	                          	<div class="grid" style="height: 200px;" ui-grid-resize-columns ui-grid="serviceStatusMgr"/>
	                        </div>
						</uib-tab> 
						
					</uib-tabset>

				</div>
			</div>
		</div>

			<div class="col-lg-12 bgff">
				<div class="col-sm-1"></div>
				<div class="col-sm-8">
					<button class="btn btn-primary btn-rounded btn-mr20" ng-show="hasPermit('merchant.update')" ng-disabled="horizontal.$invalid || submitting" type="button" ng-click="commitInfo()">提交</button><a class="btn btn-primary4 btn-rounded" type="button" ui-sref="merchant.queryMer">返回</a>
				</div>
			</div>
		<div style="clear: both"></div>
	</form>
</div>
